This invention relates generally to central processor units, or microprocessors and microcomputers, and is particularly directed to automatically reinitiating proper central processor unit operation following detection of improper execution of its operating program.
When power is applied to a system incorporating a microprocessor, a microcomputer or a central processor unit, which terms are used interchangeably for purposes of the present application, the microprocessor is typically energized after a suitable time delay. This time delay allows for system stabilization in order to permit various well-defined power supply levels and clock frequencies to be provided to the microprocessor. The microprocessor then generally executes an initialization or power up reset routine wherein the microprocessor program counter is loaded with the starting address contained in a read only memory (ROM). The contents of that memory location initiate the initialization program routine which initializes random access memory (RAM) variables, buffer pointers, and output port latches. In general, this initialization routine defines and establishes the initial conditions for microprocessor operation including a resetting of its logic to an initialized condition from which subsequent operation may proceed.
Microprocessor reset is also required following an interruption of normal microprocessor operation. An interruption in microprocessor operation may be due to various abnormal operating conditions. For example, variations and interruptions of input power may require a reinitialization of the microprocessor. This condition may be due to poor electrical connector contacts, circuit board flexure, a malfunctioning fuse holder switch, or a total loss of line power. In addition, faulty system clock operation and excessive noise on the input lines thereto may result in failure of the microprocessor to execute the program stored therein. U.S. Pat. No. 4,403,302 to Young et al discloses a system for automatically resetting a microcomputer in response to a loss of the system timing reference by comparing the occurrence of a display scan signal with a reference time interval based upon the input power line frequency. An article entitled "Watchdog Timer Guards 8748/8749 .mu. C Systems" in the Oct. 14, 1982, edition of Electronic Design by E. V. Thompson discloses a software watchdog timer arrangement wherein a desired count is loaded into a timer count register during the power-up sequence. At one or more times during the main execution loop, the timer must be reloaded with the desired count before the timer overflows from the previous load or a timer-interrupt will occur. The timer-interrupt service software can perform the controlled system shutdown or, if desired, restart the system with the power-up sequence. Similarly, another article entitled "Comparator-based Restart Circuit Automatically Revives Stalled .mu. Ps" in the Sept. 3, 1981, edition of Electronic Design by W. E. Earle discloses an automatic restart circuit for a microprocessor which includes a quad comparator, in which one comparator acts as a low-voltage sensor, two act as oscillators, and the fourth acts as a wave shaper, and which generates a negative-going restart pulse when either the supply voltage is too low or the microprocessor hangs up and fails to provide periodic "watchdog" reset pulses. Whatever the cause, proper microprocessor operation is precluded until the microprocessor is returned to the aforementioned set of initial conditions.
To accomplish this initialization process, generally two signals are provided to the microprocessor. One input is from a power supply which provides a well-defined voltage level necessary for proper logic circuitry operation. Another input, generally termed the power up reset or restart signal, initiates the initialization routine previously described. These two inputs are generally provided by the same source, e.g., a DC power supply.
In general, microprocessors and microcomputers include reset circuitry and/or program routines which effect the clearing of certain data from memory, the initialization of a stored program sequence, and in some cases the turnoff of certain load devices in response to a command signal generated upon application of input power to the system. In some cases, the system may provide an indication to the user of an input voltage transient or outage requiring the user to turn the system off and/or attempt to reset and restart it where the problem is suspected of only being transitory and no longer present. This approach to resuming normal microprocessor operation is expensive in that it requires constant monitoring of the system by an operator, is unreliable in that it requires a human response to a given system condition, and may be inconvenient particularly where the microprocessor-based system is at a remote location.
The present invention is intended to overcome the aforementioned limitations of the prior art by providing for the automatic reset of a microprocessor upon detection of improper execution of its operating program. The present invention attempts to reset the microprocessor and will continue providing a reset signal thereto until it is properly reinitialized to permit resumption of normal operation. Various indications are provided to an operator and to a host computer of an interruption in normal operation and a resetting of the microprocessor.